﻿<%@ Page Language="C#"  AutoEventWireup="true" Inherits="WorkFlow_WFProcess_Assign" Codebehind="Assign.aspx.cs" %>
<%@ Register Src="../Control/WFTitle.ascx" TagName="WFTitle" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>流程处理</title>
       <base target="_self" />
        <meta http-equiv="Pragma" content="no-cache" />
       <meta http-equiv="Cache-Control" content="no-cache"/>
       <meta http-equiv="Expires" content="0"/>   
       <script language="javascript" type="text/javascript" src="js/Win.js"></script>
       <link href="../css/showDiv/opendiv.css" rel="stylesheet" type="text/css" />
        <script language="javascript" type="text/javascript" src="../css/showDiv/opendiv.js"></script>
         <style type="text/css">
        body
        {
            font-size:12px;
        }
        </style>
        <link href="../Styles/control.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div align="center" style="vertical-align:top">
        <table width="98%">
            <tr height="40px">
                <td style="width: 100%">
                    <uc2:WFTitle ID="WFTitle1" runat="server"/>
                </td>
            </tr>            
            <tr height="360px" valign="top" align="left">
                <td style="width: 90%" valign="top">
                    <div style="overflow-x:hidden;overflow-y:auto;height:358px">                    
                        <table width="100%">
                            <tr style="height:20px">
                                <td width="20px">
                                </td>
                                <td align="left" valign="top">
                                    <font color="blue"><B>紧急程度：</B></font>
                                    <asp:RadioButtonList ID="rblUrgentLevel" runat="server" RepeatLayout="Flow">
                                    </asp:RadioButtonList></td>
                            </tr>
                            <tr>
                                <td width="20px">
                                </td>
                                <td align="left" valign="top">
                                    <asp:TreeView ID="tvAssign" runat="server" ShowCheckBoxes="Leaf" ShowLines="True">                                    
                                        
                                    </asp:TreeView>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr height="25px">
                <td style="width: 100%" align="right">
                    <table width="100%">
                        <tr>
                            <td align="left"  >
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnSelAll" runat="server"  class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  Text="全选" OnClientClick="SelectAll(true);return false;"  />
                                <asp:Button ID="btnInverseSel" runat="server"  class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  Text="反选" OnClientClick="InverseSelect();return false;"  />
                            </td>
                            <td>
                                <asp:Button ID="btnBefore" runat="server"  class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  Text="上一步" Visible="false" />                            
                                <asp:Button ID="btnNext" runat="server"  class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  Text="完  成"  TabIndex="1" OnClientClick="return checkAssign();" OnClick="btnNext_Click" />                    
                                <asp:Button ID="btnCancel" runat="server"  class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  Text="取  消"  OnClientClick="window.close();"/>&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                         </tr>
                     </table>
                </td>
            </tr>
        </table>
    </div>    
    </form>
    <!-- #INCLUDE FILE="../css/showDiv/Part.txt" -->
    <script language="javascript" type="text/javascript">
    if(window.returnValue == null)
    {
        window.returnValue=GetCancelParam();
    }    
    function SelectAll(IsChecked)
    {
        var objs = document.getElementById('<%=tvAssign.ClientID %>').getElementsByTagName("input"); 
        for(var i = 0; i < objs.length; i++)
        { 
            if(objs[i].type=="checkbox")
            { 
                objs[i].checked = IsChecked; 
            } 
        } 
    }
    function InverseSelect()
    {
        var objs = document.getElementById('<%=tvAssign.ClientID %>').getElementsByTagName("input"); 
        for(var i = 0; i < objs.length; i++)
        { 
            if(objs[i].type=="checkbox")
            { 
                objs[i].checked = !objs[i].checked; 
            } 
        } 
    }   
    function checkAssign()
    {
        var objs = document.getElementById('<%=tvAssign.ClientID %>').getElementsByTagName("input"); 
        for(var i = 0; i < objs.length; i++)
        { 
            if(objs[i].type=="checkbox")
            { 
                if(objs[i].checked  == true)
                {
                    WF_divshow(0,'',200,40);
                    return true;
                }
            } 
        } 
        window.alert("请正确指派环节的执行人！");
        return false;
    }
    </script>
</body>
</html>


